/*    */ package eos.moe.dragoncore.tweaker;
/*    */ 
/*    */ import java.io.File;
/*    */ import java.net.URISyntaxException;
/*    */ import java.net.URL;
/*    */ import java.security.CodeSource;
/*    */ import java.util.Map;
/*    */ import java.util.zip.ZipEntry;
/*    */ import java.util.zip.ZipFile;
/*    */ import net.minecraft.launchwrapper.Launch;
/*    */ import net.minecraftforge.fml.relauncher.CoreModManager;
/*    */ import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
/*    */ import org.apache.logging.log4j.LogManager;
/*    */ import org.spongepowered.asm.launch.MixinBootstrap;
/*    */ import org.spongepowered.asm.mixin.Mixins;
/*    */ 
/*    */ public class ForgePlugin
/*    */   implements IFMLLoadingPlugin
/*    */ {
/*    */   public ForgePlugin() {
/* 21 */     System.out.println("[DragonCore] LoadingPlugin");
/* 22 */     if (Launch.blackboard.get("fml.deobfuscatedEnvironment") != Boolean.FALSE) {
/* 23 */       MixinBootstrap.init();
/*    */     }
/* 25 */     Mixins.addConfiguration("mixins.dragoncore.json");
/*    */ 
/*    */ 
/*    */ 
/*    */     
/* 30 */     CodeSource codeSource = getClass().getProtectionDomain().getCodeSource();
/* 31 */     if (codeSource != null) {
/* 32 */       URL uRL = codeSource.getLocation();
/*    */       try {
/* 34 */         File file1 = new File(uRL.toURI());
/* 35 */         if (file1.isFile()) {
/* 36 */           CoreModManager.getIgnoredMods().remove(file1.getName());
/*    */         }
/* 38 */       } catch (URISyntaxException uRISyntaxException) {
/* 39 */         uRISyntaxException.printStackTrace();
/*    */       } 
/*    */     } else {
/* 42 */       LogManager.getLogger().warn("No CodeSource, if this is not a development environment we might run into problems!");
/* 43 */       LogManager.getLogger().warn(getClass().getProtectionDomain());
/*    */     } 
/*    */     
/* 46 */     File file = new File(Launch.minecraftHome, "mods");
/* 47 */     File[] arrayOfFile = file.listFiles();
/* 48 */     if (arrayOfFile != null) {
/* 49 */       for (File file1 : arrayOfFile) {
/* 50 */         if (file1.getName().endsWith(".jar") || file1.getName().endsWith(".zip")) {
/*    */           try {
/* 52 */             ZipFile zipFile = new ZipFile(file1);
/* 53 */             ZipEntry zipEntry = zipFile.getEntry("dragonarmourers.json");
/* 54 */             if (zipEntry != null) {
/* 55 */               Launch.classLoader.addURL(file1.toURI().toURL());
/*    */             }
/* 57 */           } catch (Throwable throwable) {
/* 58 */             throwable.printStackTrace();
/*    */           } 
/*    */         }
/*    */       } 
/*    */     }
/*    */   }
/*    */ 
/*    */   
/*    */   public String[] getASMTransformerClass() {
/* 67 */     return new String[] { TransformerManager.class.getName() };
/*    */   }
/*    */ 
/*    */   
/*    */   public String getModContainerClass() {
/* 72 */     return null;
/*    */   }
/*    */ 
/*    */   
/*    */   public String getSetupClass() {
/* 77 */     return null;
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public void injectData(Map map) {}
/*    */ 
/*    */   
/*    */   public String getAccessTransformerClass() {
/* 86 */     return null;
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\tweaker\ForgePlugin.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */